# DEEP ROCK GALACTIC SAVE EDITOR

**Note: ALWAYS BACKUP YOUR SAVE FILE**

There are likely to be bugs, please see the Known Issues and Troubleshooting section.

This repo provides continued support and updates for [robertnunn/DRG-Save-Editor](https://github.com/robertnunn/DRG-Save-Editor) as the original creator has "Largely moved on from this project."

---

## INSTALLATION

### Releases (recommended)

- Download the latest release from the [releases page](https://github.com/AnthonyMichaelTDM/DRG-Save-Editor/releases)
  - For Windows: download the `DRG-Save-Editor-windows.zip` file
  - For Linux: download the `DRG-Save-Editor-linux.tar.gz` file
- Extract the contents of the archive to a folder of your choice and run the executable:
  - For Windows: run the `DRG-Save-Editor.exe` file
  - For Linux: run the `DRG-Save-Editor` file

### From Source

#### Requirements
- Python 3.12 or later
- (Optional) Git to clone the repo

#### Steps
1. Clone the repo: `git clone https://github.com/AnthonyMichaelTDM/DRG-Save-Editor.git` (or download the source code from GitHub)
2. Open your terminal in the base directory of the project
   - (Optional) Run `python --version` to ensure the version is correct
   - (Optional) Run `python -m venv venv` to create a virtual environment
     - Activate the virtual environment with the following command:
       - For Windows: `.\venv\Scripts\activate`
       - For Linux: `source ./venv/bin/activate`
3. Install the required packages with pip: `pip install -r ./requirements.txt`
4. Start the program: `python ./src/main/python/main.py`

If these instructions are unclear, [NerdyJosh1](https://github.com/NerdyJosh1) has made a [video tutorial for Windows users](https://www.youtube.com/watch?v=2h2-nZ2ptRo&ab_channel=NerdyJosh)
- Note: this tutorial was made for version 1.7.0/1.8.0 of the editor, some things have changed since then

---

## KNOWN ISSUES

The editor works by looking for specific values in the raw data of the save, it doesn't decode the data into a nice, neat Python object. If certain things aren't present in the save (e.g., >0 forged overclocks, certain resources), the editor will malfunction and give nonsensical results. The solution is to acquire at least one of the resources in-game _then_ use the editor.

---

## TROUBLESHOOTING

If the editor opens but doesn't edit your save properly (i.e., values not being read properly, changes not being reflected in-game, etc.), please open an issue, describe the problem thoroughly, and attach a copy of your save file from BEFORE any edits were attempted.

---

## USAGE

The editor will make a backup of the save file you open in the same folder as the save file with the extension of `.old`. This backup is created the moment you open the save file.

The editor should be self-explanatory (see the screenshot in the original README).

Additional Notes:
- There is a context menu in the overclock tree listing to add overclocks to the inventory
- You can CTRL+Click on overclocks to select more than one
- Changing XP values will update other relevant fields when focus changes
- If you have promotions beyond Legendary 3, those promotions will be preserved as long as the drop-down is set to "Legendary 3+"